package com.etoak.car.service;



import com.etoak.car.bean.Admin;
import com.etoak.car.bean.Users;
import com.etoak.car.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminService {
    @Autowired
    private AdminMapper dao;



    public Admin login(String username, String password) {
        return dao.queryAdminByNameAndPwd(username,password);
    }

    public int register(Users users) {
        return dao.register(users);
    }

    public Admin isAdmin(String username, String password) {
        return dao.isAdmin(username,password);
    }

    public int updateAdmin(String username, String newPassword) {
        return dao.updateAdmin(username,newPassword);
    }
}
